-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement upload_file endpoint #547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 42ba863 in 41 seconds
More details
- Looked at
122
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_xLBVCtMoytuhnRVa
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on 42ba863 in 56 seconds
More details
- Looked at
121
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_D2ir5aicMD9gHwTo
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Uploads to: ``` s3://skyvern-uploads/<ENV>/<ORG_ID>/<TODAY'S DATE>/<UUID>_<FILENAME> Ex: s3://skyvern-uploads/local/o_221157791538210890/2024-07-03/2e95b6fd-9dd6-4c1b-a79f-0e8a24ab14c5_cat.avif ``` <!-- ELLIPSIS_HIDDEN --> ---- | 🚀 | This description was created by [Ellipsis](https://www.ellipsis.dev) for commit 9fcc5363e207314ff99811721274db6b757aa4fc | |--------|--------| ### Summary: Added `upload_file` endpoint to upload files to S3 and return presigned URLs, with `aws_client` initialization moved to `skyvern/forge/sdk/api/aws.py`. **Key points**: - Added `upload_file` endpoint in `skyvern/forge/sdk/routes/agent_protocol.py`. - Endpoint uploads file to `s3://<bucket>/<env>/<org_id>/<date>/<uuid>_<filename>`. - Returns S3 URI and presigned URL for the uploaded file. - Added `aws_client` initialization in `skyvern/forge/sdk/api/aws.py`. - Removed `AsyncAWSClient` initialization from `skyvern/forge/app.py`. - Handles file reading, S3 upload, and presigned URL generation. ---- Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev) <!-- ELLIPSIS_HIDDEN -->
42ba863
to
af269db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on af269db in 38 seconds
More details
- Looked at
82
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_bVJM5jBNqPISnlYm
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
TODO:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on 0f65662 in 39 seconds
More details
- Looked at
81
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_Nv4L01v8oZmzJFnh
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on 726cdcc in 37 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_MXi2LCBhTUeCCEPo
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Uploads to:
Summary:
Added
upload_file
endpoint to upload files to S3, initializedaws_client
, and included methods for file stream uploads and size validation.Key points:
upload_file
endpoint inskyvern/forge/sdk/routes/agent_protocol.py
to upload files to S3.s3://<bucket>/<env>/<org_id>/<date>/<uuid>_<filename>
.aws_client
initialization inskyvern/forge/sdk/api/aws.py
.AsyncAWSClient
initialization fromskyvern/forge/app.py
.aws_client.upload_file_stream
method inskyvern/forge/sdk/api/aws.py
to handle file stream uploads.validate_file_size
function inskyvern/forge/sdk/routes/agent_protocol.py
to check file size before upload.skyvern/config.py
to includeMAX_UPLOAD_FILE_SIZE
configuration.s3://skyvern-uploads/<ENV>/<ORG_ID>/<TODAY'S DATE>/<UUID>_<FILENAME>
Generated with ❤️ by ellipsis.dev